import java.awt.Component;
import java.util.Random;
import java.util.Vector;

import javax.swing.JOptionPane;


public class Partida {
	protected Vector<Zombie> zombies;
	protected int cantZombies;
	protected Vector<HiloZombie> hilos;
	protected boolean perdio = false;
	
	public Partida (Vector<Zombie> v) {
		this.zombies = v;
		this.cantZombies= 0;
		this.hilos = new Vector<HiloZombie>(10);
	}
	
	public void agregarZombie(Zombie z) {
		zombies.add(z);
	}
	
	public Vector<Zombie> getZombies() {
		return zombies;
	}
	
	public void comenzarPartida() {
		for(HiloZombie hz: hilos) {
			hz.start();
		}
	}
	
	public void detenerPartida() {
		for(HiloZombie hz : hilos)
			hz.stop();
		perdio = true;
	}
	
	public boolean haPerdido() {
		return perdio;
	}
	
}
